package com.huike.clues.service.impl;

import com.huike.clues.domain.SysDictData;
import com.huike.clues.mapper.SysDictDataMapper;
import com.huike.clues.service.ISysDictDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

@Service
public class SysDictDataServiceImpl implements ISysDictDataService {
    @Autowired
    private SysDictDataMapper dictDataMapper;

    /**
     * 获取字典数据
     */
    @Override
    public List<SysDictData> selectDictDataByType(String dictType) {
        return dictDataMapper.selectDictDataByType(dictType);
    }
    /**
     * 根据字典类型分页查询字典数据列表
     */
    @Override
    public List<SysDictData> selectDictDataList(SysDictData dictData) {
        return dictDataMapper.selectDictDataList(dictData);
    }
    /**
     * 新增字典数据
     */
    @Override
    //公共字段填充注解
    public void insertDictData(SysDictData dict) {
        dictDataMapper.insertDictData(dict);
    }
    /**
     * 查询字典数据详细（查询回显）
     */
    @Override
    public SysDictData selectDictDataById(Long dictCode) {
        return dictDataMapper.selectDictDataById(dictCode);
    }
    /**
     * 修改保存字典数据
     */
    @Override
    public void updateDictData(SysDictData dict) {
        dictDataMapper.updateDictData(dict);
    }
    /**
     * 删除字典数据
     */
    @Override
    public void deleteDictDataByIds(Long[] dictCodes) {
        dictDataMapper.deleteDictDataByIds(dictCodes);
    }
}
